<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: magic_updateline.php 6757 2010-03-25 09:01:29Z cnteacher $
 */

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

magic_check_idtype($id, $idtype);

if(submitcheck("usesubmit")) {

	$tablename = gettablebyidtype($idtype);
	DB::query("UPDATE ".DB::table($tablename)." SET dateline = '$_G[timestamp]' WHERE $idtype = '$id' AND uid = '$_G[uid]'");

	DB::query("UPDATE ".DB::table('home_feed')." SET dateline = '$_G[timestamp]' WHERE id = '$id' AND idtype = '$idtype' AND uid = '$_G[uid]'");

	magic_use($mid, array('id'=>$id, 'idtype'=>$idtype), true);
	showmessage('magicuse_success', dreferer());
}

?>